package com.gues.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gues.eneity.RolePermission;
import com.gues.mapper.RolePermissionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@SuppressWarnings("all")
public class RolePermissionService {

    @Autowired
    RolePermissionMapper rolePermissionMapper;

    public List<RolePermission> selectByRoleId(Integer roleId) {
        QueryWrapper<RolePermission> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("role_id", roleId);
        return rolePermissionMapper.selectList(queryWrapper);
    }

}
